@echo off

echo Delete database . . .
DEL DB\airsoft.bak || GOTO ERROR

echo Create new backup . . .
sqlcmd -S .\SQLEXPRESS -Q ^
    "BACKUP DATABASE [airsoft] TO  DISK = N'%~dp0\DB\airsoft.bak' WITH NOFORMAT, NOINIT,  NAME = N'airsoft-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10" ^
    -b -o con || GOTO ERROR

echo Success!!!

GOTO END

:ERROR
color C
echo    ------------------------------- ERROR !!!!! -------------------------------
:END

pause 
